package com.ronglian.iot.config;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;

/**
 * @program: aep-user
 * @author: RonglianAdmin
 * @create: 2020-10-28 15:27
 **/
@Configuration
public class DataSourceConfig {

    @Bean
    @ConfigurationProperties("spring.datasource.admin")
    public DataSource dataSourceProxy() {
        return DruidDataSourceBuilder.create().build();
    }

}
